/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package vers_test;

/**
 *
 * @author info
 */
public class Vers_test {

  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) {
    int cntFuzzes = 0;
    int cntBuzzes = 0;
    int input = 4;
    System.out.println("Factorial(" + input + ") = " + factorial(input));
    for (int i = 1; i <= 100; i++) {
      /*
       If an integer is both a multiple of 3 and 5
       */
      if (i % 3 == 0 && i % 5 == 0) {
        System.out.println("FizzBuzz : " + i);
      } else if (i % 3 == 0) {
        /*
         Only if input is a multiple of 3
         */
        System.out.println("Fizz : " + i);
        cntFuzzes++;
      } else if (i % 5 == 0) {
        /*
         Only if input is a multiple of 5
         */
        System.out.println("Buzz : " + i);
        cntBuzzes++;
      }
    }
    if (cntFuzzes < cntBuzzes) {
      System.out.println("More {" + cntBuzzes + "} buzzes than fizzes {" + cntFuzzes + "}");
    } else if (cntFuzzes > cntBuzzes) {
      System.out.println("More fuzzes {" + cntFuzzes + "} than buzzes {" + cntBuzzes + "}");
    } else if (cntFuzzes == cntBuzzes) {
      System.out.println("buzzes {" + cntBuzzes + "} are equal in size with fuzzes {" + cntFuzzes + "}");
    }
  }

  static int factorial(int n) {
    return n > 1 ? n * factorial(n - 1) : 1;
  }

}
